#ifndef CMAKEPROJECTMANAGER_H
#define CMAKEPROJECTMANAGER_H

#include <fstream>
#include <string>
#include <vector>

#include "../iprojectmanagerplugin.h"

class CMakeProjectManager : public IProjectManagerPlugin {
    public:
        CMakeProjectManager() {}
        virtual ~CMakeProjectManager() {}
        virtual void Initialize() {}

        /// events
        virtual void RegisterEvent( ProjectEventBus* eventBus );
        virtual bool HandleEvent( Events::Event* event );
        virtual void Release() {}

        /// import/export project files
        virtual void importProjectFiles( const std::string& inbasefile );
        virtual void exportProjectFiles( const std::string& outbasefile );

        /// temp function...   ;)
        virtual void printInfo();

    private:
        void extract_contents( std::ifstream& fp, std::string& str, std::vector<std::string>& contents );
        void extract_filesets( ProjectTarget* target );
        void parse( std::ifstream& fp );
};

DECLARE_PROJECT_MANAGER_PLUGIN_CLASS( CMakeProjectManager )

#endif // CMAKEPROJECTMANAGER_H
